const mongoose = require('../db/db.js')
const order = mongoose.Schema({
	userOpenid: {
		type: String,
		required: true,
		select: false // 设置后，返回数据时隐藏
	},
	createTime: {
		type: Date,
		default: new Date
	},
	goodsName: String,
	goodsImg: String,
	goodsColor: String,
	goodsPrice: String,
	goodsCount: Number,
	orderTotal: Number,
	orderStatus: {
		type: String,
		default: '待支付'
	}
})
module.exports = mongoose.model('order', order)
